﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WC.BL.BE;
using WC.DL.DALC.Factory;

namespace WC.BL.BCC
{
    public class ClienteBC
    {
        public static string write(ClienteBE pObjClienteBE)
        {
            string retval = string.Empty;
            try
            {
                retval = DAOFactory.ClienteDALC.write(pObjClienteBE);
            }
            catch (Exception ex)
            {
                retval = ex.Message;
            }
            return retval;
        }

        public static string validaCli(string pRuc)
        {
            string retval = string.Empty;
            try
            {
                retval = DAOFactory.ClienteDALC.validaCli(pRuc);
            }
            catch (Exception ex)
            {
                retval = ex.Message;
            }
            return retval;
        }

        public static List<ClienteBE> find(string pCodigo, string pDescripcion, string pRuc)
        {
            List<ClienteBE> lstClientes = new List<ClienteBE>();
            try
            {
                lstClientes = DAOFactory.ClienteDALC.find(pCodigo, pDescripcion, pRuc);
            }
            catch (Exception ex)
            {
                
            }
            return lstClientes;
        }
    }
}
